3.36 \(\int x^2 (a+b \log (c x^n))^2 \log (d (\frac{1}{d}+f x^2)) \, dx\)

Optimal. Leaf size=612 \[ \frac{2 b n \text{PolyLog}\left (2,-\sqrt{-d} \sqrt{f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{3 (-d)^{3/2} f^{3/2}}-\frac{2 b n \text{PolyLog}\left (2,\sqrt{-d} \sqrt{f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{3 (-d)^{3/2} f^{3/2}}-\frac{2 i b^2 n^2 \text{PolyLog}\left (2,-i \sqrt{d} \sqrt{f} x\right )}{9 d^{3/2} f^{3/2}}+\frac{2 i b^2 n^2 \text{PolyLog}\left (2,i \sqrt{d} \sqrt{f} x\right )}{9 d^{3/2} f^{3/2}}-\frac{2 b^2 n^2 \text{PolyLog}\left (3,-\sqrt{-d} \sqrt{f} x\right )}{3 (-d)^{3/2} f^{3/2}}+\frac{2 b^2 n^2 \text{PolyLog}\left (3,\sqrt{-d} \sqrt{f} x\right )}{3 (-d)^{3/2} f^{3/2}}+\frac{4 b n \tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{9 d^{3/2} f^{3/2}}-\frac{\log \left (1-\sqrt{-d} \sqrt{f} x\right ) \left (a+b \log \left (c x^n\right )\right )^2}{3 (-d)^{3/2} f^{3/2}}+\frac{\log \left (\sqrt{-d} \sqrt{f} x+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{3 (-d)^{3/2} f^{3/2}}+\frac{1}{3} x^3 \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac{2}{9} b n x^3 \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )+\frac{2 x \left (a+b \log \left (c x^n\right )\right )^2}{3 d f}-\frac{2}{9} x^3 \left (a+b \log \left (c x^n\right )\right )^2+\frac{8}{27} b n x^3 \left (a+b \log \left (c x^n\right )\right )-\frac{16 a b n x}{9 d f}-\frac{16 b^2 n x \log \left (c x^n\right )}{9 d f}-\frac{4 b^2 n^2 \tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right )}{27 d^{3/2} f^{3/2}}+\frac{2}{27} b^2 n^2 x^3 \log \left (d f x^2+1\right )+\frac{52 b^2 n^2 x}{27 d f}-\frac{4}{27} b^2 n^2 x^3 \]

[Out]

(-16*a*b*n*x)/(9*d*f) + (52*b^2*n^2*x)/(27*d*f) - (4*b^2*n^2*x^3)/27 - (4*b^2*n^2*ArcTan[Sqrt[d]*Sqrt[f]*x])/(
27*d^(3/2)*f^(3/2)) - (16*b^2*n*x*Log[c*x^n])/(9*d*f) + (8*b*n*x^3*(a + b*Log[c*x^n]))/27 + (4*b*n*ArcTan[Sqrt
[d]*Sqrt[f]*x]*(a + b*Log[c*x^n]))/(9*d^(3/2)*f^(3/2)) + (2*x*(a + b*Log[c*x^n])^2)/(3*d*f) - (2*x^3*(a + b*Lo
g[c*x^n])^2)/9 - ((a + b*Log[c*x^n])^2*Log[1 - Sqrt[-d]*Sqrt[f]*x])/(3*(-d)^(3/2)*f^(3/2)) + ((a + b*Log[c*x^n
])^2*Log[1 + Sqrt[-d]*Sqrt[f]*x])/(3*(-d)^(3/2)*f^(3/2)) + (2*b^2*n^2*x^3*Log[1 + d*f*x^2])/27 - (2*b*n*x^3*(a
 + b*Log[c*x^n])*Log[1 + d*f*x^2])/9 + (x^3*(a + b*Log[c*x^n])^2*Log[1 + d*f*x^2])/3 + (2*b*n*(a + b*Log[c*x^n
])*PolyLog[2, -(Sqrt[-d]*Sqrt[f]*x)])/(3*(-d)^(3/2)*f^(3/2)) - (2*b*n*(a + b*Log[c*x^n])*PolyLog[2, Sqrt[-d]*S
qrt[f]*x])/(3*(-d)^(3/2)*f^(3/2)) - (((2*I)/9)*b^2*n^2*PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x])/(d^(3/2)*f^(3/2)) +
 (((2*I)/9)*b^2*n^2*PolyLog[2, I*Sqrt[d]*Sqrt[f]*x])/(d^(3/2)*f^(3/2)) - (2*b^2*n^2*PolyLog[3, -(Sqrt[-d]*Sqrt
[f]*x)])/(3*(-d)^(3/2)*f^(3/2)) + (2*b^2*n^2*PolyLog[3, Sqrt[-d]*Sqrt[f]*x])/(3*(-d)^(3/2)*f^(3/2))

________________________________________________________________________________________

Rubi [A]  time = 1.03388, antiderivative size = 612, normalized size of antiderivative = 1., number of steps used = 30, number of rules used = 17, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.607, Rules used = {2305, 2304, 2378, 302, 203, 2351, 2295, 2324, 12, 4848, 2391, 2353, 2296, 2330, 2317, 2374, 6589} \[ \frac{2 b n \text{PolyLog}\left (2,-\sqrt{-d} \sqrt{f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{3 (-d)^{3/2} f^{3/2}}-\frac{2 b n \text{PolyLog}\left (2,\sqrt{-d} \sqrt{f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{3 (-d)^{3/2} f^{3/2}}-\frac{2 i b^2 n^2 \text{PolyLog}\left (2,-i \sqrt{d} \sqrt{f} x\right )}{9 d^{3/2} f^{3/2}}+\frac{2 i b^2 n^2 \text{PolyLog}\left (2,i \sqrt{d} \sqrt{f} x\right )}{9 d^{3/2} f^{3/2}}-\frac{2 b^2 n^2 \text{PolyLog}\left (3,-\sqrt{-d} \sqrt{f} x\right )}{3 (-d)^{3/2} f^{3/2}}+\frac{2 b^2 n^2 \text{PolyLog}\left (3,\sqrt{-d} \sqrt{f} x\right )}{3 (-d)^{3/2} f^{3/2}}+\frac{4 b n \tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{9 d^{3/2} f^{3/2}}-\frac{\log \left (1-\sqrt{-d} \sqrt{f} x\right ) \left (a+b \log \left (c x^n\right )\right )^2}{3 (-d)^{3/2} f^{3/2}}+\frac{\log \left (\sqrt{-d} \sqrt{f} x+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{3 (-d)^{3/2} f^{3/2}}+\frac{1}{3} x^3 \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac{2}{9} b n x^3 \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )+\frac{2 x \left (a+b \log \left (c x^n\right )\right )^2}{3 d f}-\frac{2}{9} x^3 \left (a+b \log \left (c x^n\right )\right )^2+\frac{8}{27} b n x^3 \left (a+b \log \left (c x^n\right )\right )-\frac{16 a b n x}{9 d f}-\frac{16 b^2 n x \log \left (c x^n\right )}{9 d f}-\frac{4 b^2 n^2 \tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right )}{27 d^{3/2} f^{3/2}}+\frac{2}{27} b^2 n^2 x^3 \log \left (d f x^2+1\right )+\frac{52 b^2 n^2 x}{27 d f}-\frac{4}{27} b^2 n^2 x^3 \]

Antiderivative was successfully verified.

[In]

Int[x^2*(a + b*Log[c*x^n])^2*Log[d*(d^(-1) + f*x^2)],x]

[Out]

(-16*a*b*n*x)/(9*d*f) + (52*b^2*n^2*x)/(27*d*f) - (4*b^2*n^2*x^3)/27 - (4*b^2*n^2*ArcTan[Sqrt[d]*Sqrt[f]*x])/(
27*d^(3/2)*f^(3/2)) - (16*b^2*n*x*Log[c*x^n])/(9*d*f) + (8*b*n*x^3*(a + b*Log[c*x^n]))/27 + (4*b*n*ArcTan[Sqrt
[d]*Sqrt[f]*x]*(a + b*Log[c*x^n]))/(9*d^(3/2)*f^(3/2)) + (2*x*(a + b*Log[c*x^n])^2)/(3*d*f) - (2*x^3*(a + b*Lo
g[c*x^n])^2)/9 - ((a + b*Log[c*x^n])^2*Log[1 - Sqrt[-d]*Sqrt[f]*x])/(3*(-d)^(3/2)*f^(3/2)) + ((a + b*Log[c*x^n
])^2*Log[1 + Sqrt[-d]*Sqrt[f]*x])/(3*(-d)^(3/2)*f^(3/2)) + (2*b^2*n^2*x^3*Log[1 + d*f*x^2])/27 - (2*b*n*x^3*(a
 + b*Log[c*x^n])*Log[1 + d*f*x^2])/9 + (x^3*(a + b*Log[c*x^n])^2*Log[1 + d*f*x^2])/3 + (2*b*n*(a + b*Log[c*x^n
])*PolyLog[2, -(Sqrt[-d]*Sqrt[f]*x)])/(3*(-d)^(3/2)*f^(3/2)) - (2*b*n*(a + b*Log[c*x^n])*PolyLog[2, Sqrt[-d]*S
qrt[f]*x])/(3*(-d)^(3/2)*f^(3/2)) - (((2*I)/9)*b^2*n^2*PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x])/(d^(3/2)*f^(3/2)) +
 (((2*I)/9)*b^2*n^2*PolyLog[2, I*Sqrt[d]*Sqrt[f]*x])/(d^(3/2)*f^(3/2)) - (2*b^2*n^2*PolyLog[3, -(Sqrt[-d]*Sqrt
[f]*x)])/(3*(-d)^(3/2)*f^(3/2)) + (2*b^2*n^2*PolyLog[3, Sqrt[-d]*Sqrt[f]*x])/(3*(-d)^(3/2)*f^(3/2))

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2378

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((g_.)*(x_))^(q_.),
 x_Symbol] :> With[{u = IntHide[(g*x)^q*(a + b*Log[c*x^n])^p, x]}, Dist[Log[d*(e + f*x^m)^r], u, x] - Dist[f*m
*r, Int[Dist[x^(m - 1)/(e + f*x^m), u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && IGtQ[p, 0
] && RationalQ[m] && RationalQ[q]

Rule 302

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2324

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> With[{u = IntHide[1/(d + e*x^2),
 x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[u/x, x], x]] /; FreeQ[{a, b, c, d, e, n}, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 4848

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[(I*b)/2, Int[Log[1 - I*c*x
]/x, x], x] - Dist[(I*b)/2, Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2353

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2330

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = Expand
Integrand[(a + b*Log[c*x^n])^p, (d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n, p, q, r}
, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[r]))

Rule 2317

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[1 + (e*x)/d]*(a +
b*Log[c*x^n])^p)/e, x] - Dist[(b*n*p)/e, Int[(Log[1 + (e*x)/d]*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2374

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> -Sim
p[(PolyLog[2, -(d*f*x^m)]*(a + b*Log[c*x^n])^p)/m, x] + Dist[(b*n*p)/m, Int[(PolyLog[2, -(d*f*x^m)]*(a + b*Log
[c*x^n])^(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin{align*} \int x^2 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac{1}{d}+f x^2\right )\right ) \, dx &=\frac{2}{27} b^2 n^2 x^3 \log \left (1+d f x^2\right )-\frac{2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )+\frac{1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )-(2 f) \int \left (\frac{2 b^2 d n^2 x^4}{27 \left (1+d f x^2\right )}-\frac{2 b d n x^4 \left (a+b \log \left (c x^n\right )\right )}{9 \left (1+d f x^2\right )}+\frac{d x^4 \left (a+b \log \left (c x^n\right )\right )^2}{3 \left (1+d f x^2\right )}\right ) \, dx\\ &=\frac{2}{27} b^2 n^2 x^3 \log \left (1+d f x^2\right )-\frac{2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )+\frac{1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )-\frac{1}{3} (2 d f) \int \frac{x^4 \left (a+b \log \left (c x^n\right )\right )^2}{1+d f x^2} \, dx+\frac{1}{9} (4 b d f n) \int \frac{x^4 \left (a+b \log \left (c x^n\right )\right )}{1+d f x^2} \, dx-\frac{1}{27} \left (4 b^2 d f n^2\right ) \int \frac{x^4}{1+d f x^2} \, dx\\ &=\frac{2}{27} b^2 n^2 x^3 \log \left (1+d f x^2\right )-\frac{2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )+\frac{1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )-\frac{1}{3} (2 d f) \int \left (-\frac{\left (a+b \log \left (c x^n\right )\right )^2}{d^2 f^2}+\frac{x^2 \left (a+b \log \left (c x^n\right )\right )^2}{d f}+\frac{\left (a+b \log \left (c x^n\right )\right )^2}{d^2 f^2 \left (1+d f x^2\right )}\right ) \, dx+\frac{1}{9} (4 b d f n) \int \left (-\frac{a+b \log \left (c x^n\right )}{d^2 f^2}+\frac{x^2 \left (a+b \log \left (c x^n\right )\right )}{d f}+\frac{a+b \log \left (c x^n\right )}{d^2 f^2 \left (1+d f x^2\right )}\right ) \, dx-\frac{1}{27} \left (4 b^2 d f n^2\right ) \int \left (-\frac{1}{d^2 f^2}+\frac{x^2}{d f}+\frac{1}{d^2 f^2 \left (1+d f x^2\right )}\right ) \, dx\\ &=\frac{4 b^2 n^2 x}{27 d f}-\frac{4}{81} b^2 n^2 x^3+\frac{2}{27} b^2 n^2 x^3 \log \left (1+d f x^2\right )-\frac{2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )+\frac{1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )-\frac{2}{3} \int x^2 \left (a+b \log \left (c x^n\right )\right )^2 \, dx+\frac{2 \int \left (a+b \log \left (c x^n\right )\right )^2 \, dx}{3 d f}-\frac{2 \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{1+d f x^2} \, dx}{3 d f}+\frac{1}{9} (4 b n) \int x^2 \left (a+b \log \left (c x^n\right )\right ) \, dx-\frac{(4 b n) \int \left (a+b \log \left (c x^n\right )\right ) \, dx}{9 d f}+\frac{(4 b n) \int \frac{a+b \log \left (c x^n\right )}{1+d f x^2} \, dx}{9 d f}-\frac{\left (4 b^2 n^2\right ) \int \frac{1}{1+d f x^2} \, dx}{27 d f}\\ &=-\frac{4 a b n x}{9 d f}+\frac{4 b^2 n^2 x}{27 d f}-\frac{8}{81} b^2 n^2 x^3-\frac{4 b^2 n^2 \tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right )}{27 d^{3/2} f^{3/2}}+\frac{4}{27} b n x^3 \left (a+b \log \left (c x^n\right )\right )+\frac{4 b n \tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{9 d^{3/2} f^{3/2}}+\frac{2 x \left (a+b \log \left (c x^n\right )\right )^2}{3 d f}-\frac{2}{9} x^3 \left (a+b \log \left (c x^n\right )\right )^2+\frac{2}{27} b^2 n^2 x^3 \log \left (1+d f x^2\right )-\frac{2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )+\frac{1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )-\frac{2 \int \left (\frac{\left (a+b \log \left (c x^n\right )\right )^2}{2 \left (1-\sqrt{-d} \sqrt{f} x\right )}+\frac{\left (a+b \log \left (c x^n\right )\right )^2}{2 \left (1+\sqrt{-d} \sqrt{f} x\right )}\right ) \, dx}{3 d f}+\frac{1}{9} (4 b n) \int x^2 \left (a+b \log \left (c x^n\right )\right ) \, dx-\frac{(4 b n) \int \left (a+b \log \left (c x^n\right )\right ) \, dx}{3 d f}-\frac{\left (4 b^2 n\right ) \int \log \left (c x^n\right ) \, dx}{9 d f}-\frac{\left (4 b^2 n^2\right ) \int \frac{\tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right )}{\sqrt{d} \sqrt{f} x} \, dx}{9 d f}\\ &=-\frac{16 a b n x}{9 d f}+\frac{16 b^2 n^2 x}{27 d f}-\frac{4}{27} b^2 n^2 x^3-\frac{4 b^2 n^2 \tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right )}{27 d^{3/2} f^{3/2}}-\frac{4 b^2 n x \log \left (c x^n\right )}{9 d f}+\frac{8}{27} b n x^3 \left (a+b \log \left (c x^n\right )\right )+\frac{4 b n \tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{9 d^{3/2} f^{3/2}}+\frac{2 x \left (a+b \log \left (c x^n\right )\right )^2}{3 d f}-\frac{2}{9} x^3 \left (a+b \log \left (c x^n\right )\right )^2+\frac{2}{27} b^2 n^2 x^3 \log \left (1+d f x^2\right )-\frac{2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )+\frac{1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )-\frac{\int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{1-\sqrt{-d} \sqrt{f} x} \, dx}{3 d f}-\frac{\int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{1+\sqrt{-d} \sqrt{f} x} \, dx}{3 d f}-\frac{\left (4 b^2 n\right ) \int \log \left (c x^n\right ) \, dx}{3 d f}-\frac{\left (4 b^2 n^2\right ) \int \frac{\tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right )}{x} \, dx}{9 d^{3/2} f^{3/2}}\\ &=-\frac{16 a b n x}{9 d f}+\frac{52 b^2 n^2 x}{27 d f}-\frac{4}{27} b^2 n^2 x^3-\frac{4 b^2 n^2 \tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right )}{27 d^{3/2} f^{3/2}}-\frac{16 b^2 n x \log \left (c x^n\right )}{9 d f}+\frac{8}{27} b n x^3 \left (a+b \log \left (c x^n\right )\right )+\frac{4 b n \tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{9 d^{3/2} f^{3/2}}+\frac{2 x \left (a+b \log \left (c x^n\right )\right )^2}{3 d f}-\frac{2}{9} x^3 \left (a+b \log \left (c x^n\right )\right )^2-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt{-d} \sqrt{f} x\right )}{3 (-d)^{3/2} f^{3/2}}+\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt{-d} \sqrt{f} x\right )}{3 (-d)^{3/2} f^{3/2}}+\frac{2}{27} b^2 n^2 x^3 \log \left (1+d f x^2\right )-\frac{2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )+\frac{1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )+\frac{(2 b n) \int \frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (1-\sqrt{-d} \sqrt{f} x\right )}{x} \, dx}{3 (-d)^{3/2} f^{3/2}}-\frac{(2 b n) \int \frac{\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\sqrt{-d} \sqrt{f} x\right )}{x} \, dx}{3 (-d)^{3/2} f^{3/2}}-\frac{\left (2 i b^2 n^2\right ) \int \frac{\log \left (1-i \sqrt{d} \sqrt{f} x\right )}{x} \, dx}{9 d^{3/2} f^{3/2}}+\frac{\left (2 i b^2 n^2\right ) \int \frac{\log \left (1+i \sqrt{d} \sqrt{f} x\right )}{x} \, dx}{9 d^{3/2} f^{3/2}}\\ &=-\frac{16 a b n x}{9 d f}+\frac{52 b^2 n^2 x}{27 d f}-\frac{4}{27} b^2 n^2 x^3-\frac{4 b^2 n^2 \tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right )}{27 d^{3/2} f^{3/2}}-\frac{16 b^2 n x \log \left (c x^n\right )}{9 d f}+\frac{8}{27} b n x^3 \left (a+b \log \left (c x^n\right )\right )+\frac{4 b n \tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{9 d^{3/2} f^{3/2}}+\frac{2 x \left (a+b \log \left (c x^n\right )\right )^2}{3 d f}-\frac{2}{9} x^3 \left (a+b \log \left (c x^n\right )\right )^2-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt{-d} \sqrt{f} x\right )}{3 (-d)^{3/2} f^{3/2}}+\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt{-d} \sqrt{f} x\right )}{3 (-d)^{3/2} f^{3/2}}+\frac{2}{27} b^2 n^2 x^3 \log \left (1+d f x^2\right )-\frac{2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )+\frac{1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )+\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (-\sqrt{-d} \sqrt{f} x\right )}{3 (-d)^{3/2} f^{3/2}}-\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (\sqrt{-d} \sqrt{f} x\right )}{3 (-d)^{3/2} f^{3/2}}-\frac{2 i b^2 n^2 \text{Li}_2\left (-i \sqrt{d} \sqrt{f} x\right )}{9 d^{3/2} f^{3/2}}+\frac{2 i b^2 n^2 \text{Li}_2\left (i \sqrt{d} \sqrt{f} x\right )}{9 d^{3/2} f^{3/2}}-\frac{\left (2 b^2 n^2\right ) \int \frac{\text{Li}_2\left (-\sqrt{-d} \sqrt{f} x\right )}{x} \, dx}{3 (-d)^{3/2} f^{3/2}}+\frac{\left (2 b^2 n^2\right ) \int \frac{\text{Li}_2\left (\sqrt{-d} \sqrt{f} x\right )}{x} \, dx}{3 (-d)^{3/2} f^{3/2}}\\ &=-\frac{16 a b n x}{9 d f}+\frac{52 b^2 n^2 x}{27 d f}-\frac{4}{27} b^2 n^2 x^3-\frac{4 b^2 n^2 \tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right )}{27 d^{3/2} f^{3/2}}-\frac{16 b^2 n x \log \left (c x^n\right )}{9 d f}+\frac{8}{27} b n x^3 \left (a+b \log \left (c x^n\right )\right )+\frac{4 b n \tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right ) \left (a+b \log \left (c x^n\right )\right )}{9 d^{3/2} f^{3/2}}+\frac{2 x \left (a+b \log \left (c x^n\right )\right )^2}{3 d f}-\frac{2}{9} x^3 \left (a+b \log \left (c x^n\right )\right )^2-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt{-d} \sqrt{f} x\right )}{3 (-d)^{3/2} f^{3/2}}+\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt{-d} \sqrt{f} x\right )}{3 (-d)^{3/2} f^{3/2}}+\frac{2}{27} b^2 n^2 x^3 \log \left (1+d f x^2\right )-\frac{2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )+\frac{1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )+\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (-\sqrt{-d} \sqrt{f} x\right )}{3 (-d)^{3/2} f^{3/2}}-\frac{2 b n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (\sqrt{-d} \sqrt{f} x\right )}{3 (-d)^{3/2} f^{3/2}}-\frac{2 i b^2 n^2 \text{Li}_2\left (-i \sqrt{d} \sqrt{f} x\right )}{9 d^{3/2} f^{3/2}}+\frac{2 i b^2 n^2 \text{Li}_2\left (i \sqrt{d} \sqrt{f} x\right )}{9 d^{3/2} f^{3/2}}-\frac{2 b^2 n^2 \text{Li}_3\left (-\sqrt{-d} \sqrt{f} x\right )}{3 (-d)^{3/2} f^{3/2}}+\frac{2 b^2 n^2 \text{Li}_3\left (\sqrt{-d} \sqrt{f} x\right )}{3 (-d)^{3/2} f^{3/2}}\\ \end{align*}

Mathematica [A]  time = 0.592345, size = 703, normalized size = 1.15 \[ \frac{-18 b n \left (-i \left (\text{PolyLog}\left (2,-i \sqrt{d} \sqrt{f} x\right )+\log (x) \log \left (1+i \sqrt{d} \sqrt{f} x\right )\right )+i \left (\text{PolyLog}\left (2,i \sqrt{d} \sqrt{f} x\right )+\log (x) \log \left (1-i \sqrt{d} \sqrt{f} x\right )\right )+\frac{2}{9} d^{3/2} f^{3/2} x^3 (3 \log (x)-1)-2 \sqrt{d} \sqrt{f} x (\log (x)-1)\right ) \left (3 a+3 b \log \left (c x^n\right )-3 b n \log (x)-b n\right )+54 b^2 n^2 \left (\frac{1}{2} i \left (-2 \text{PolyLog}\left (3,-i \sqrt{d} \sqrt{f} x\right )+2 \log (x) \text{PolyLog}\left (2,-i \sqrt{d} \sqrt{f} x\right )+\log ^2(x) \log \left (1+i \sqrt{d} \sqrt{f} x\right )\right )-\frac{1}{2} i \left (-2 \text{PolyLog}\left (3,i \sqrt{d} \sqrt{f} x\right )+2 \log (x) \text{PolyLog}\left (2,i \sqrt{d} \sqrt{f} x\right )+\log ^2(x) \log \left (1-i \sqrt{d} \sqrt{f} x\right )\right )-\frac{1}{27} d^{3/2} f^{3/2} x^3 \left (9 \log ^2(x)-6 \log (x)+2\right )+\sqrt{d} \sqrt{f} x \left (\log ^2(x)-2 \log (x)+2\right )\right )+3 d^{3/2} f^{3/2} x^3 \log \left (d f x^2+1\right ) \left (9 a^2-6 b (b n-3 a) \log \left (c x^n\right )-6 a b n+9 b^2 \log ^2\left (c x^n\right )+2 b^2 n^2\right )-2 d^{3/2} f^{3/2} x^3 \left (9 a^2+18 a b \left (\log \left (c x^n\right )-n \log (x)\right )-6 a b n+9 b^2 \left (\log \left (c x^n\right )-n \log (x)\right )^2+6 b^2 n \left (n \log (x)-\log \left (c x^n\right )\right )+2 b^2 n^2\right )+6 \sqrt{d} \sqrt{f} x \left (9 a^2+18 a b \left (\log \left (c x^n\right )-n \log (x)\right )-6 a b n+9 b^2 \left (\log \left (c x^n\right )-n \log (x)\right )^2+6 b^2 n \left (n \log (x)-\log \left (c x^n\right )\right )+2 b^2 n^2\right )-6 \tan ^{-1}\left (\sqrt{d} \sqrt{f} x\right ) \left (9 a^2+18 a b \left (\log \left (c x^n\right )-n \log (x)\right )-6 a b n+9 b^2 \left (\log \left (c x^n\right )-n \log (x)\right )^2+6 b^2 n \left (n \log (x)-\log \left (c x^n\right )\right )+2 b^2 n^2\right )}{81 d^{3/2} f^{3/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*(a + b*Log[c*x^n])^2*Log[d*(d^(-1) + f*x^2)],x]

[Out]

(6*Sqrt[d]*Sqrt[f]*x*(9*a^2 - 6*a*b*n + 2*b^2*n^2 + 6*b^2*n*(n*Log[x] - Log[c*x^n]) + 18*a*b*(-(n*Log[x]) + Lo
g[c*x^n]) + 9*b^2*(-(n*Log[x]) + Log[c*x^n])^2) - 2*d^(3/2)*f^(3/2)*x^3*(9*a^2 - 6*a*b*n + 2*b^2*n^2 + 6*b^2*n
*(n*Log[x] - Log[c*x^n]) + 18*a*b*(-(n*Log[x]) + Log[c*x^n]) + 9*b^2*(-(n*Log[x]) + Log[c*x^n])^2) - 6*ArcTan[
Sqrt[d]*Sqrt[f]*x]*(9*a^2 - 6*a*b*n + 2*b^2*n^2 + 6*b^2*n*(n*Log[x] - Log[c*x^n]) + 18*a*b*(-(n*Log[x]) + Log[
c*x^n]) + 9*b^2*(-(n*Log[x]) + Log[c*x^n])^2) + 3*d^(3/2)*f^(3/2)*x^3*(9*a^2 - 6*a*b*n + 2*b^2*n^2 - 6*b*(-3*a
 + b*n)*Log[c*x^n] + 9*b^2*Log[c*x^n]^2)*Log[1 + d*f*x^2] - 18*b*n*(3*a - b*n - 3*b*n*Log[x] + 3*b*Log[c*x^n])
*(-2*Sqrt[d]*Sqrt[f]*x*(-1 + Log[x]) + (2*d^(3/2)*f^(3/2)*x^3*(-1 + 3*Log[x]))/9 - I*(Log[x]*Log[1 + I*Sqrt[d]
*Sqrt[f]*x] + PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x]) + I*(Log[x]*Log[1 - I*Sqrt[d]*Sqrt[f]*x] + PolyLog[2, I*Sqrt
[d]*Sqrt[f]*x])) + 54*b^2*n^2*(Sqrt[d]*Sqrt[f]*x*(2 - 2*Log[x] + Log[x]^2) - (d^(3/2)*f^(3/2)*x^3*(2 - 6*Log[x
] + 9*Log[x]^2))/27 + (I/2)*(Log[x]^2*Log[1 + I*Sqrt[d]*Sqrt[f]*x] + 2*Log[x]*PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*
x] - 2*PolyLog[3, (-I)*Sqrt[d]*Sqrt[f]*x]) - (I/2)*(Log[x]^2*Log[1 - I*Sqrt[d]*Sqrt[f]*x] + 2*Log[x]*PolyLog[2
, I*Sqrt[d]*Sqrt[f]*x] - 2*PolyLog[3, I*Sqrt[d]*Sqrt[f]*x])))/(81*d^(3/2)*f^(3/2))

________________________________________________________________________________________

Maple [F]  time = 0.093, size = 0, normalized size = 0. \begin{align*} \int{x}^{2} \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) ^{2}\ln \left ( d \left ({d}^{-1}+f{x}^{2} \right ) \right ) \, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*ln(c*x^n))^2*ln(d*(1/d+f*x^2)),x)

[Out]

int(x^2*(a+b*ln(c*x^n))^2*ln(d*(1/d+f*x^2)),x)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))^2*log(d*(1/d+f*x^2)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (b^{2} x^{2} \log \left (d f x^{2} + 1\right ) \log \left (c x^{n}\right )^{2} + 2 \, a b x^{2} \log \left (d f x^{2} + 1\right ) \log \left (c x^{n}\right ) + a^{2} x^{2} \log \left (d f x^{2} + 1\right ), x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))^2*log(d*(1/d+f*x^2)),x, algorithm="fricas")

[Out]

integral(b^2*x^2*log(d*f*x^2 + 1)*log(c*x^n)^2 + 2*a*b*x^2*log(d*f*x^2 + 1)*log(c*x^n) + a^2*x^2*log(d*f*x^2 +
 1), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*ln(c*x**n))**2*ln(d*(1/d+f*x**2)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \log \left (c x^{n}\right ) + a\right )}^{2} x^{2} \log \left ({\left (f x^{2} + \frac{1}{d}\right )} d\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))^2*log(d*(1/d+f*x^2)),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)^2*x^2*log((f*x^2 + 1/d)*d), x)